Linux查看Mac和IP地址 您所在的位置:网站首页 linux查看ip a Linux查看Mac和IP地址

Linux查看Mac和IP地址

2024-06-24 20:55| 来源: 网络整理| 查看: 265

1、ifconfig  可查看ip和Mac

可以查看所有激活的网卡信息,其中包括Mac和IP地址

[root@loaclhost /]# ifconfig

2、ifconfig -a|grep 10  可查看ip和Mac(比较直观)

当Linux上没有连接鼠标时,无法通过鼠标查看Mac和IP,所以用该命令可以简要显示网卡的前十个重要简短信息,这样就看的比较直观。

[root@loaclhost /]# ifconfig -a|grep 10

3、ip addr 、ip addr show、 ip address show 可查看ip和Mac

三条命令输出的内容相同。查看网卡的ip和Mac、掩码等相关信息。 

[root@loaclhost /]# ip addr

[root@loaclhost /]# ip addr show

[root@loaclhost /]# ip address show

4、ifconfig|grep ether    只查看网卡的所有Mac地址。

[root@loaclhost /]# ifconfig |grep ether

5、ip link 只查看网卡的所有Mac地址。

[root@loaclhost /]# ip link

-----------------------------------------以下无正文------------------------------



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有